package org.yu.team2023.flashdays.client;

import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.math.Axis;
import lombok.NonNull;
import net.minecraft.ChatFormatting;
import net.minecraft.client.Minecraft;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.util.Mth;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.Pose;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.entity.player.PlayerModelPart;
import net.minecraft.world.item.RecordItem;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import software.bernie.geckolib.util.RenderUtils;

import javax.annotation.Nullable;

@OnlyIn(Dist.CLIENT)
public class ClientUtil {
    public static void playerSound(@Nullable SoundEvent pSoundEvent, BlockPos pPos, @Nullable RecordItem musicDiscItem) {
        Minecraft.getInstance().levelRenderer.playStreamingMusic(pSoundEvent, pPos, musicDiscItem);
    }

    public static void playerSound(@NonNull SoundEvent pSoundEvent, BlockPos pPos) {
        playerSound(pSoundEvent, pPos, null);
    }

    public static void playerSound(@NonNull RecordItem musicDiscItem, BlockPos pPos) {
        playerSound(null, pPos, musicDiscItem);
    }

    public static void stopSound(BlockPos pPos) {
        playerSound(null, pPos, null);
    }


}
